package com.huahua.api.service.entertainment.website.impl;

import com.huahua.api.entity.entertainment.website.pojo.EntertainmentWebsiteGenerateSetting;
import com.huahua.api.repository.entertainment.website.EntertainmentWebsiteGenerateSettingRepository;
import com.huahua.api.service.entertainment.website.EntertainmentWebsiteGenerateSettingService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * @author LoveHuaHua
 * @date 2023年08月21日 21:07
 * @description believe in yourself
 */
@Service
@RequiredArgsConstructor
public class EntertainmentWebsiteGenerateSettingServiceImpl implements EntertainmentWebsiteGenerateSettingService {

    private final EntertainmentWebsiteGenerateSettingRepository settingRepository;

    @Override
    public Mono<EntertainmentWebsiteGenerateSetting> findById(Integer id) {
        return settingRepository.findById(id);
    }

    @Override
    public Flux<EntertainmentWebsiteGenerateSetting> findByTemplateId(Integer templateId) {
        return settingRepository.findByTemplateId(templateId);
    }

    @Override
    public Mono<EntertainmentWebsiteGenerateSetting> save(EntertainmentWebsiteGenerateSetting setting) {
        return settingRepository.save(setting);
    }

    @Override
    public Mono<Void> deleteById(Integer id) {
        return settingRepository.deleteById(id);
    }
}
